﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using mbine.msgc.model;
namespace mbine.msgc.controls
{
    /// <summary>
    /// Interaction logic for UCThread.xaml
    /// </summary>
    public partial class UCThread : UserControl
    {
        public CThread Thread { get; set; }

        public UCThread()
        {
            InitializeComponent();
            Thread = new CThread();

            CCUser.Instance.ThreadList.Add(Thread);
        }

        public UCThread(CThread _thread)
        {
            InitializeComponent();
            Thread = _thread;

            CCUser.Instance.ThreadList.Add(Thread);
        }

        public void SetMembers()
        {
            listMember.ItemsSource = (from u in Thread.Members select u).ToList();
        }

        private void btnShowThread_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {

        }
    }
}
